<html>
<head><meta charset="utf-8"><title>Sorbet · t-compiler/rust-analyzer · Zulip Chat Archive</title></head>
<h2>Stream: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/index.html">t-compiler/rust-analyzer</a></h2>
<h3>Topic: <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Sorbet.html">Sorbet</a></h3>

<hr>

<base href="https://rust-lang.zulipchat.com">

<head><link href="https://rust-lang.github.io/zulip_archive/style.css" rel="stylesheet"></head>

<a name="187201831"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Sorbet/near/187201831" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> matklad <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Sorbet.html#187201831">(Feb 02 2020 at 11:32)</a>:</h4>
<p>I recommend everyone to spend 50 minutes watching this talk: <a href="https://www.youtube.com/watch?v=Gdx6by6tcvw" target="_blank" title="https://www.youtube.com/watch?v=Gdx6by6tcvw">https://www.youtube.com/watch?v=Gdx6by6tcvw</a>.</p>
<p>It describes the Stripe's type checker for ruby. In particular, it describes the <em>ideal</em> incremental compiler pipeline:</p>
<ul>
<li>per-file indexing</li>
<li>global symbol table</li>
<li>per function inference</li>
</ul>
<p>It's very instructive to reflect on how this is different from rust-analyzer's architecture.</p>
<p>There are two differences:</p>
<ul>
<li>rust is much easier, because we don't have to have a <strong>global</strong> symbol table, we need only per-crate symbol table.</li>
<li>rust is much harder, because, due to macro expansion, the second phase, which is the "design bottleneck" is much more complicated and slow :(</li>
</ul>
<div class="youtube-video message_inline_image"><a data-id="Gdx6by6tcvw" href="https://www.youtube.com/watch?v=Gdx6by6tcvw" target="_blank" title="https://www.youtube.com/watch?v=Gdx6by6tcvw"><img src="https://i.ytimg.com/vi/Gdx6by6tcvw/default.jpg"></a></div>



<a name="187313540"></a>
<h4><a href="https://rust-lang.zulipchat.com#narrow/stream/185405-t-compiler/rust-analyzer/topic/Sorbet/near/187313540" class="zl"><img src="https://rust-lang.github.io/zulip_archive/assets/img/zulip.svg" alt="view this post on Zulip" style="width:20px;height:20px;"></a> lqd <a href="https://rust-lang.github.io/zulip_archive/stream/185405-t-compiler/rust-analyzer/topic/Sorbet.html#187313540">(Feb 03 2020 at 22:46)</a>:</h4>
<p>there's also a recent blogpost about it <a href="https://blog.nelhage.com/post/why-sorbet-is-fast/" target="_blank" title="https://blog.nelhage.com/post/why-sorbet-is-fast/">https://blog.nelhage.com/post/why-sorbet-is-fast/</a> (part of an ongoing series on Sorbet)</p>



<hr><p>Last updated: Aug 07 2021 at 22:04 UTC</p>
</html>